package edu.gdut.thesissys.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * ScoreWeight entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "score_weight", catalog = "gdutmis", uniqueConstraints = @UniqueConstraint(columnNames = "department_id"))
public class ScoreWeight extends BaseVo implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 4300041357114604498L;
	private Integer scoreWeightId;
	private Department department;
	private Double oneReview;
	private Double twoReviewOne;
	private Double twoReviewTwo;
	private Double threeReview;

	// Constructors

	/** default constructor */
	public ScoreWeight() {
	}

	/** minimal constructor */
	public ScoreWeight(Department department) {
		this.department = department;
	}

	/** full constructor */
	public ScoreWeight(Department department, Double oneReview,
			Double twoReviewOne, Double twoReviewTwo, Double threeReview) {
		this.department = department;
		this.oneReview = oneReview;
		this.twoReviewOne = twoReviewOne;
		this.twoReviewTwo = twoReviewTwo;
		this.threeReview = threeReview;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "score_weight_id", unique = true, nullable = false)
	public Integer getScoreWeightId() {
		return this.scoreWeightId;
	}

	public void setScoreWeightId(Integer scoreWeightId) {
		this.scoreWeightId = scoreWeightId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "department_id", unique = true, nullable = false)
	public Department getDepartment() {
		return this.department;
	}

	public void setDepartment(Department department) {
		this.department = department;
	}

	@Column(name = "one_review", precision = 6)
	public Double getOneReview() {
		return this.oneReview;
	}

	public void setOneReview(Double oneReview) {
		this.oneReview = oneReview;
	}

	@Column(name = "two_review_one", precision = 6)
	public Double getTwoReviewOne() {
		return this.twoReviewOne;
	}

	public void setTwoReviewOne(Double twoReviewOne) {
		this.twoReviewOne = twoReviewOne;
	}

	@Column(name = "two_review_two", precision = 6)
	public Double getTwoReviewTwo() {
		return this.twoReviewTwo;
	}

	public void setTwoReviewTwo(Double twoReviewTwo) {
		this.twoReviewTwo = twoReviewTwo;
	}

	@Column(name = "three_review", precision = 6)
	public Double getThreeReview() {
		return this.threeReview;
	}

	public void setThreeReview(Double threeReview) {
		this.threeReview = threeReview;
	}

}